home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 52 / Amiga Format AFCD52 (Issue 136, May 2000).iso / -serious- / programming / other / dopus412-gpl / program / dopusdata.h < prev    next >
C/C++ Source or Header  |  2000-02-28  |  14KB  |  278 lines

  1. /*
  2.  
  3. Directory Opus 4
  4. Original GPL release version 4.12
  5. Copyright 1993-2000 Jonathan Potter
  6.  
  7. This program is free software; you can redistribute it and/or
  8. modify it under the terms of the GNU General Public License
  9. as published by the Free Software Foundation; either version 2
  10. of the License, or (at your option) any later version.
  11.  
  12. This program is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with this program; if not, write to the Free Software
  19. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. All users of Directory Opus 4 (including versions distributed
  22. under the GPL) are entitled to upgrade to the latest version of
  23. Directory Opus version 5 at a reduced price. Please see
  24. http://www.gpsoft.com.au for more information.
  25.  
  26. The release of Directory Opus 4 under the GPL in NO WAY affects
  27. the existing commercial status of Directory Opus 5.
  28.  
  29. */
  30.  
  31. #ifndef DOPUS_DATA
  32. #define DOPUS_DATA
  33.  
  34. /* SAS Detach information */
  35.  
  36. extern long _stack;                              /* Stack size needed */
  37. extern long _priority;                           /* Default task priority */
  38. extern long _BackGroundIO;                       /* Background IO off */
  39. extern char *_procname;                          /* Task name */
  40.  
  41. /* Library bases */
  42.  
  43. extern struct DOpusBase *DOpusBase;              /* dopus.library */
  44. extern struct IntuitionBase *IntuitionBase;      /* intuition.library */
  45. extern struct GfxBase *GfxBase;                  /* graphics.library */
  46. extern struct Library *IconBase;                 /* icon.library */
  47. extern struct Library *DiskfontBase;             /* diskfont.library */
  48. extern struct Library *PPBase;                   /* powerpacker.library */
  49. extern struct Library *LayersBase;               /* layers.library */
  50. extern struct Library *WorkbenchBase;            /* workbench.library */
  51. extern struct Library *MUSICBase;                /* music.library */
  52. extern struct Library *CxBase;                   /* commodities.library */
  53. extern struct Library *RexxSysBase;              /* rexxsyslib.library */
  54. extern struct Library *AccountsBase;             /* accounts.library */
  55. extern struct Library *UtilityBase;              /* utility.library */
  56.  
  57. extern struct DosLibrary *DOSBase;               /* dos.library */
  58. extern struct ExecBase *SysBase;                 /* exec.library */
  59.  
  60. /* Intuition objects */
  61.  
  62. extern struct IntuiMessage *IMsg;                /* Main IntuiMessage pointer */
  63. extern struct Screen *MainScreen;                /* Main screen */
  64. extern struct Screen *iffscreen;                 /* IFF display screen */
  65. extern struct Screen *fontscreen;                /* Font display screen */
  66. extern struct Screen *blankscreen;               /* Blank screen for IFF viewer */
  67. extern struct Window *Window;                    /* Main window */
  68. extern struct Window *fontwindow;                /* Window for font display */
  69. extern struct Window *ansiread_window;           /* Window for rendering ANSI text */
  70. extern struct Window *reqoverride;               /* Pointer for SimpleRequest window */
  71.  
  72. /* Graphics objects */
  73.  
  74. extern struct ViewPort *main_vp;                 /* Main screen ViewPort */
  75.  
  76. extern struct RastPort *main_rp;                 /* Main window RastPort */
  77. extern struct RastPort *font_rp;                 /* Font window RastPort */
  78. extern struct RastPort *bar_rp;                  /* Screen BarLayer RastPort */
  79. extern struct RastPort dir_rp[2];                /* Directory window RastPorts */
  80.  
  81. extern struct TextFont *scr_font[NUMFONTS];      /* Fonts used in screen display */
  82.  
  83. extern struct Layer *scr_barlayer;               /* New Screen BarLayer */
  84. extern struct Layer *scr_old_barlayer;           /* Old Screen BarLayer */
  85.  
  86. extern BYTE scr_old_barheight;                   /* Old Screen BarHeight */
  87. extern BYTE scr_new_barheight;
  88.  
  89. /* Exec objects */
  90.  
  91. extern struct Process *main_proc;                /* Main Process */
  92. extern struct Task *hotkey_task;                 /* HotKey Task */
  93. extern struct Task *clock_task;                  /* Clock Task */
  94.  
  95. extern struct MsgPort *count_port;               /* Port to establish run count */
  96. extern struct MsgPort *general_port;             /* General Message Port */
  97. extern struct MsgPort *audio_port[2];            /* 8SVX Sound player Ports */
  98. extern struct MsgPort *appmsg_port;              /* AppObject Message Port */
  99. extern struct MsgPort *arexx_port;               /* ARexx Port */
  100.  
  101. extern struct MsgPort *hotkeymsg_port;           /* Messages to the hotkey task */
  102. extern struct MsgPort *clockmsg_port;            /* Messages to the clock task */
  103.  
  104. extern struct IOStdReq *keyboard_req;            /* Keyboard IO Request block */
  105. extern struct IOStdReq *input_req;               /* Input IO Request block */
  106. extern struct IOAudio *audio_req1[2];            /* Audio IO Request block #1 */
  107. extern struct IOAudio *audio_req2[2];            /* Audio IO Request block #2 */
  108.  
  109. /* DOS objects */
  110.  
  111. extern BPTR ramdisk_lock;                        /* Lock on RAM: */
  112. extern APTR windowptr_save;                      /* Saved Window Pointer */
  113. extern LONG nil_file_handle;                     /* Handle on the NIL: device */
  114.  
  115. extern BPTR old_pr_cis;                          /* Old pr_CIS pointer */
  116. extern BPTR old_pr_cos;                          /* Old pr_COS pointer */
  117. extern void *old_pr_consoletask;                 /* Old pr_ConsoleTask pointer */
  118.  
  119. /* General objects */
  120.  
  121. extern struct DOpusRemember *general_key;        /* General memory key */
  122. extern struct DOpusRemember *help_key;           /* Memory key for help files */
  123. extern struct DOpusRemember *filetype_key;       /* Memory key for filetype list */
  124. extern struct DOpusRemember *audio_key;          /* Memory key for 8SVX player */
  125. extern struct DOpusRemember *menu_key;           /* Memory key for menus */
  126.  
  127. extern USHORT *nullpalette;                      /* Pointer to a black palette */
  128. extern UBYTE *audiodata;                         /* Audio data to play */
  129. extern ULONG audio_size;                         /* Size of audio data */
  130.  
  131. extern struct UserInfo *user_info;               /* UserInfo for envoy */
  132. extern struct GroupInfo *group_info;             /* GroupInfo for envoy */
  133.  
  134.  
  135. /* Directory Opus Internal objects */
  136.  
  137. extern struct Directory *last_selected_entry;    /* The last entry selected */
  138. extern struct Help *dopus_firsthelp;             /* The first help message */
  139. extern struct dopusfiletype *dopus_firsttype;    /* The first filetype */
  140. extern struct dopusgadgetbanks
  141.     *dopus_firstgadbank;                           /* The first gadget bank */
  142. extern struct dopusgadgetbanks
  143.     *dopus_curgadbank;                             /* The current gadget bank */
  144. extern struct dopushotkey *dopus_firsthotkey;    /* The first hotkey */
  145. extern struct dopushotkey *dopus_globalhotkey;   /* The last hotkey function */
  146.  
  147. extern struct DirectoryWindow *dopus_curwin[2];  /* Currently displayed buffer */
  148. extern struct DirectoryWindow
  149.     *dopus_firstwin[2];                            /* First buffer in each window */
  150. extern struct DirectoryWindow
  151.     *dopus_specialwin[2];                          /* Special buffer for each window */
  152. extern struct DirectoryWindow *dopus_oldwin[2];  /* Last buffer displayed */
  153.  
  154. extern void *dir_memory_pool;                    /* Memory pool for allocations */
  155.  
  156.  
  157. /* String data */
  158.  
  159. extern char str_config_basename[256];            /* Configuration file path name */
  160. extern char str_config_file[256];                /* Configuration file */
  161. extern char str_dopusrt_path[256];               /* DOpusRT path name */
  162.  
  163. extern char str_select_info[80];                 /* Status bar text for selection info */
  164. extern char *str_select_pattern[3];              /* Three different Select patterns */
  165. extern char *str_arexx_command;                  /* Entered ARexx command string */
  166. extern char *str_space_string;                   /* 255 spaces in a string */
  167. extern char str_hunt_name[80];                   /* File name to hunt for */
  168. extern char str_hunt_name_parsed[164];           /* Hunt file parsed */
  169. extern char str_search_string[80];               /* String to search for */
  170. extern char str_filter[40];                      /* File filter for searching */
  171. extern char str_filter_parsed[84];               /* File filter parsed */
  172.  
  173. extern char str_version_string[30];              /* Current version string */
  174. extern char str_arexx_portname[30];              /* ARexx Port name */
  175.  
  176. extern UBYTE var_key_matrix[13];                 /* Keyboard matrix data area */
  177. extern char *str_last_statustext;                /* Last status text displayed */
  178.  
  179. extern char str_last_rexx_result[256];           /* Last ARexx result */
  180.  
  181. /* Various data */
  182.  
  183. extern BYTE status_iconified;                    /* Current iconified status */
  184. extern BYTE status_configuring;                  /* Configuring status */
  185. extern BYTE status_justabort;                    /* Have we just aborted? */
  186. extern BYTE status_haveaborted;                  /* The abort sequence has been hit */
  187. extern BYTE status_rexxabort;                    /* Abort flag for ARexx scripts */
  188. extern BYTE status_previousabort;                /* Did we abort a while ago ? */
  189. extern BYTE status_publicscreen;                 /* Are we on a public screen? */
  190. extern ULONG status_flags;                       /* Various status bits */
  191.  
  192. extern BYTE data_active_window;                  /* Active directory window */
  193. extern UBYTE data_buffer_count[2];               /* Number of buffers in each window */
  194. extern BYTE data_gadgetrow_offset;               /* Gadget row offset */
  195. extern SHORT data_drive_offset;                  /* Current drive offset */
  196. extern ULONG data_colorclock;                    /* Color clock value for this system */
  197.  
  198. extern ULONG time_current_sec;                   /* Current Second (from Intuition) */
  199. extern ULONG time_current_micro;                 /* Current Micro (from Intuition) */
  200. extern ULONG time_previous_sec;                  /* Previous Second (from Intuition) */
  201. extern ULONG time_previous_micro;                /* Previous Micro (from Intuition) */
  202.  
  203. extern UBYTE system_version2;                    /* OS version 2 or greater */
  204. extern int system_dopus_runcount;                /* Run count of this copy */
  205.  
  206. extern ULONG data_window_refresh;                /* Windows that need refreshing */
  207.  
  208. extern USHORT scr_gadget_rows;                   /* Number of button rows */
  209. extern USHORT scr_gadget_bank_count;             /* Number of button banks */
  210.  
  211. extern USHORT scr_min_width;                     /* Minimum window width */
  212. extern USHORT scr_min_height;                    /* Minimum window height */
  213.  
  214. /* Configuration data */
  215.  
  216. extern struct Config *config;                    /* Configuration structure */
  217. extern BPTR configopus_segment;                  /* Segment pointer for ConfigOpus */
  218. extern BPTR external_mod_segment[3];             /* External module segments */
  219. extern BYTE config_changed;                      /* Configuration has been changed */
  220.  
  221. /* Disk and DOS operations data */
  222.  
  223. extern UBYTE disk_change_state;                  /* Lower bits indicate change state */
  224.  
  225. extern ULONG dos_global_bytecount;               /* Global byte count from recursive op */
  226. extern ULONG dos_global_copiedbytes;             /* Bytes copied in a recursive op */
  227. extern ULONG dos_global_deletedbytes;            /* Bytes copied in a recursive op */
  228. extern ULONG dos_global_blocksneeded;            /* Number of blocks needed to copy */
  229.  
  230. extern struct DateStamp dos_copy_date;           /* DateStamp of file last copied */
  231. extern ULONG dos_copy_protection;                /* Protection of file last copied */
  232. extern char dos_copy_comment[80];                /* Comment of file last copied */
  233.  
  234. extern BOOL glob_unprotect_all;                  /* Unprotect all files */
  235.  
  236. extern BOOL global_swap_window;                  /* Active window changed */
  237.  
  238. extern struct Directory dos_global_entry;        /* Global single file entry */
  239.  
  240. extern struct NotifyRequest *dos_notify_req[2];  /* Notify requests for both windows */
  241. extern char dos_notify_names[2][256];            /* Notify requests name buffers */
  242.  
  243. extern struct recpath *rec_firstpath;            /* Directory path list pointer */
  244. extern struct DOpusRemember *rec_pathkey;        /* Memory key for dir list */
  245.  
  246. extern struct Requester dopus_busy_requester;    /* Busy requester */
  247.  
  248. extern char *icon_type_names[];                  /* Names of different icon types */
  249.  
  250. extern struct DOpusRemember *recurse_dir_key;    /* Memory key for RecursiveDirectory's */
  251. extern struct RecursiveDirectory *first_recurse; /* First recursive directory pointer */
  252. extern int recurse_max_depth;                    /* Maximum depth reached */
  253. extern struct RecursiveDirectory
  254.     **recurse_parent_array;                        /* Array of parent directories */
  255.  
  256. extern struct path_complete completion[2];       /* Path-name completion data */
  257.  
  258. /* DateTime stuff */
  259.  
  260. extern char *date_months[12];                    /* Months */
  261. extern char *date_shortmonths[12];               /* Short months */
  262. extern char *date_weekdays[7];                   /* Weekdays */
  263. extern char *date_shortweekdays[7];              /* Short weekdays */
  264. extern char *date_special[4];                    /* Special days */
  265.  
  266. extern struct StringData stringdata;             /* String data */
  267.  
  268.  
  269. /* Gadgets from tasks.c */
  270.  
  271. extern struct Gadget abortopgad;
  272. extern struct Gadget closegadget_gad;
  273. extern struct Gadget upfrontgadget_gad;
  274. extern struct Gadget downbackgadget_gad;
  275.  
  276.  
  277. #endif
  278.